<?php

class RolesTableSeeder extends Seeder {

    public function run()
    {

        $adminRole = new Role();
        $adminRole->name = 'administrators';
        $adminRole->display_name = '管理层';
        $adminRole->save();

        $user = User::where('username','=','admin')->first();
        $user->attachRole( $adminRole );

    }

}
